Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

GitContext

class GitContext

Local repository information.

commits

commits: list[Any] = dataclasses.field(default_factory=list)

List of last commits (Commit objects from GitPython).

current_author

current_author: str = ''

Author email for last commit.

current_committer

current_committer: str = ''

Committer name for last commit.

current_date_authored

current_date_authored: dt.datetime | None = None

Date authored for last commit.

current_date_committed

current_date_committed: dt.datetime | None = None

Date committed for last commit.

current_sha

current_sha: str = ''

SHA of last commit.

edit_uri

edit_uri: str | None = None

Edit uri (depends on code hoster).

last_version

last_version: str | None = None

Name of last commit tag.

main_branch

main_branch: str = ''

Name of the main branch of the repo (master / main).

repo_hoster

repo_hoster: str = ''

Name of the code hoster (for example GitHub)

repo_name

repo_name: str = ''

Name of the git folder.

__init__

def __init__(main_branch: str = '', repo_name: str = '', commits: list[Any] = list(), repo_hoster: str = '', edit_uri: str | None = None, current_sha: str = '', current_committer: str = '', current_date_committed: dt.datetime | None = None, current_author: str = '', current_date_authored: dt.datetime | None = None, last_version: str | None = None) -> None

__repr__

def __repr__() -> str
Page info
Resources
Resources(css=[],
          markdown_extensions={},
          plugins=[],
          js=[],
          assets=[],
          packages=[])
Metadata
created:
  source_filename: /home/runner/work/mknodes/mknodes/src/mknodes/manual/templating_section.py
  source_function: _
  source_line_no: 42
title: GitContext